import 'package:du_application/model/GoodsModel.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import './GoodsDetailsGoodsCard.dart';
class DetailRelation extends StatelessWidget {
  final  List<ForGoods> forGoods;
  const DetailRelation({Key key,this.forGoods}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: ScreenUtil().setHeight(500),
      color: Colors.white,
      child: Column(
        children: <Widget>[
          Container(  
             padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setHeight(30)),
                      margin: EdgeInsets.only(top: ScreenUtil().setHeight(30)),
                      height: ScreenUtil().setHeight(100),
                      color: Colors.white,
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: <Widget>[
                          Text("相关产品",
                              style: TextStyle(
                                  color: Colors.grey[600], fontSize: 12)),
                          Row(
                            children: <Widget>[
                              Text("全部",
                                  style: TextStyle(
                                      color: Colors.grey[600], fontSize: 12)),
                              Icon(
                                Icons.arrow_forward_ios,
                                color: Colors.grey[200],
                                size: 10,
                              ),
                            ],
                          ),
                        ],
                      ),
                    ),
                Container(
                  height: ScreenUtil().setHeight(350),
                  child: GridView.count(
                
                    physics:NeverScrollableScrollPhysics(),
                    crossAxisCount: 3,
                    shrinkWrap: true,
                    children: forGoods.map((item){
                       return getGoodsDetailsGoodsCard(context,item);
                    }).toList(),
               )
              ),
         ],
       ),
     
    );
  }
}